package com.yuanfeng.userms.controller;

import com.yuanfeng.commoms.util.ResponseResult;
import com.yuanfeng.userms.dto.VkQuerySettingDTO;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName UserVkSetController
 * @Description
 * @Author hyq
 * @Date 2023/7/14 10:21
 * @Version 1.0
 **/
@RestController
@RequestMapping("user/vkSet")
public class UserVkSetController extends BaseController{

    /**
     * 开启或者关闭微客
     * @param dto
     * @return
     */
    @PostMapping("/enableVk")
    public ResponseResult enableVk(@RequestBody VkQuerySettingDTO dto){
        ResponseResult result=userVkSetService.enableVk(dto);
        return result;
    }

    /**
     * 添加或者修改微客设置
     */
    @PostMapping("/addOrUpdateVkSetting")
    public ResponseResult addOrUpdateVkQuerySetting(@RequestBody VkQuerySettingDTO param){
        ResponseResult result=userVkSetService.addOrUpdateVkQuerySetting(param);
        return result;
    }

    /**
     * 查询微客的设置
     */
    @GetMapping("/vkQuerySetting")
    public ResponseResult vkQuerySetting(){
        ResponseResult result=userVkSetService.vkQuerySetting();
        return result;
    }
}
